package com.ethink.mdm.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.mdm.api.info.MateSkuInfo;
import com.ethink.mdm.api.request.GroupMateMateSkuQueryRequest;
import com.ethink.mdm.api.request.MateSkuQueryRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * mateSku Facade接口
 *
 * @author default
 * @date 2022-10-31
 */
@FeignClient(name = "ethink-mdm-service", path = "mdm-service/facade/v1/mate", contextId = "mateFacade")
public interface MateFacade {

    @PostMapping("/queryMateSku")
    @ResponseBody
    Page<MateSkuInfo> queryMateSku(@RequestBody MateSkuQueryRequest request);

    @PostMapping("/queryMateSkuBySkuCodeList")
    @ResponseBody
    List<MateSkuInfo> queryMateSkuBySkuCodeList(@RequestBody List<String> mateSkuCodeList);

    @PostMapping("/getMateSkuBySkuCode")
    @ResponseBody
    MateSkuInfo getMateSkuBySkuCode(@RequestParam("mateSkuCode") String mateSkuCode);

}